#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
const int N = 1e4 + 5;

void solve() {
    int n;
    cin >> n;
    int a[N] = {0};
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    int pre_sum[N] = {0}, aft_sum[N] = {0};
    for (int i = 1; i <= n; i++) {
        pre_sum[i] = pre_sum[i - 1] + a[i];
    }
    for (int i = n; i >= 1; i--) {
        aft_sum[i] = aft_sum[i + 1] + a[i];
    }
    for (int i = 1; i < n; i++) {
        if (pre_sum[i] == aft_sum[i + 1]) {
            cout << "Yes" << endl;
            return;
        }
    }
    cout << "No" << endl;
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t;
    cin >> t;
    while (t--) solve();

    return 0;
}